 $.ajax({
                    type: "post", //数据发送的方式（post 或者 get）
                    url: "https://yingxiao.baidu.com/new/ApiHome/product/listsApi", //要发送的后台地址
                    dataType:"jsonp", //后台处理后返回的数据格式
                    data:{'class_id':8,'nav_id':43,'offset':0,'page_size':103}, //要发送的数据（参数）格式为{'val1':"1","val2":"2"}
                    success: function(data) {//ajax请求成功后触发的方法

                        console.log(data);
  
                        //最热
                        var result=data.data.articles;
                        // console.log(result);
                        for(var m=0;m<result.length-1;m++){
                              result[m].title=result[m].title.replace(/\【|】/g,'')
                              result[m].pv=parseInt(result[m].pv);
                        }

                        var result1=result.sort(sortBy("pv",false));
                        // console.log(result);

                        for(var i=0;i<=7;i++){
                              if(i==0){
                                   jQuery(".zr").append("<a target='_blank' href='http://yingxiao.baidu.com/new/product/details/id/"+result1[i].id+" style='margin-bottom: 10px'><div class='xxl'><span class='sp sp1s'>01</span><span class='sp2 text-overflow'>"+result1[i].title+"</span></div></a>");
                              }else if(i==1){
                                   jQuery(".zr").append("<a target='_blank' href='http://yingxiao.baidu.com/new/product/details/id/"+result1[i].id+" style='margin-bottom: 10px'><div class='xxl'><span class='sp sp2s'>02</span><span class='sp2 text-overflow'>"+result1[i].title+"</span></div></a>");
                              }else if(i==2){
                                   jQuery(".zr").append("<a target='_blank' href='http://yingxiao.baidu.com/new/product/details/id/"+result1[i].id+" style='margin-bottom: 10px'><div class='xxl'><span class='sp sp3s'>03</span><span class='sp2 text-overflow'>"+result1[i].title+"</span></div></a>");
                              }else{
                                   jQuery(".zr").append("<a target='_blank' href='http://yingxiao.baidu.com/new/product/details/id/"+result1[i].id+" style='margin-bottom: 10px'><div class='xxl'><span class='sp'>0"+(i+1)+"</span><span class='sp2 text-overflow'>"+result1[i].title+"</span></div></a>");
                              }
                        }


                        //最新
                        var result2=result;
                        // for(var n=0;n<=result2.length-1;n++){
                        //     result2[n].create_time=transdate(result2[n].create_time);
                        //     result_con.push(result2[n]);
                        // }
                        
                        var result3=result2.sort(sortBy("create_time",false));
                        console.log(result3);
                        
                        for(var i=0;i<=7;i++){
                              if(i==0){
                                   jQuery(".zn").append("<a target='_blank' href='http://yingxiao.baidu.com/new/product/details/id/"+result1[i].id+" style='margin-bottom: 10px'><div class='xxl'><span class='sp sp1s'>01</span><span class='sp2 text-overflow'>"+result3[i].title+"</span></div></a>");
                              }else if(i==1){
                                   jQuery(".zn").append("<a target='_blank' href='http://yingxiao.baidu.com/new/product/details/id/"+result1[i].id+" style='margin-bottom: 10px'><div class='xxl'><span class='sp sp2s'>02</span><span class='sp2 text-overflow'>"+result3[i].title+"</span></div></a>");
                              }else if(i==2){
                                   jQuery(".zn").append("<a target='_blank' href='http://yingxiao.baidu.com/new/product/details/id/"+result1[i].id+" style='margin-bottom: 10px'><div class='xxl'><span class='sp sp3s'>03</span><span class='sp2 text-overflow'>"+result3[i].title+"</span></div></a>");
                              }else{
                                   jQuery(".zn").append("<a target='_blank' href='http://yingxiao.baidu.com/new/product/details/id/"+result1[i].id+" style='margin-bottom: 10px'><div class='xxl'><span class='sp'>0"+(i+1)+"</span><span class='sp2 text-overflow'>"+result3[i].title+"</span></div></a>");
                              }
                        }



                    },
                    error: function(msg) {//ajax请求失败后触发的方法
                        alert(msg.error); //弹出错误信息
                    }
                });